<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="http://darlingbastard.com/java/taglibs/stacks" %>
<s:import url="index.jsp">
    <%-- the following line will override the 'title' value in index.jsp --%>
    <s:set var="title" >Stacks Sample #3</s:set>
    <%-- the following line will override the 'content' value in index.jsp --%>
    <s:set var="content">
        <h2>Stacks Demo #3</h2>

        <p>This is an example of using stacks to extend dynamic content into a complex template.</p>

        <p>In this example the file <a href="index.jsp">index.jsp</a>
            is being rendered but the tabs at the top now have more links.
            This is not a simple substitution like in <a href="demo2.jsp">example #2</a>
            because the content of the original <i>navlinks</i> element is still
            being used. This is done by allowing access to the overridden element via a <b>super</b>
            mechanism similar to Java's super.xxx grammer.
            </p>
    </s:set>
    <%--
    The following code will override the 'navlinks' value in index.jsp.
    The included file is treated as a super-class to this one and the values
    defined in it are not lost when replaced. You can access the
    original value as defined in index.jsp as shown below.
    --%>
    <s:set var="navlinks" >
        <s:out var="super.navlinks" /> <%-- This will print the original values as defined in index.jsp --%>
        <li><a href="#" title="Link A"><span>Link A</span></a></li>
        <li><a href="#" title="Link B"><span>Link B</span></a></li>
        <li><a href="#" title="Link C"><span>Link C</span></a></li>
    </s:set>
</s:import>
